from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
import time

testCase = "DBshop008-查看支付记录流程"
#进入后台销售管理支付记录
firefox=openBrowser(url)
firefox.get(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu2(firefox,'销售管理','支付记录')
# 2,点击用例2的订单号。
rootPath=get_pro_rootpath()
orderid=readFile(rootPath+'\public\order1.txt')
firefox.find_element_by_xpath("//a[contains(text(),'%s')]"%orderid).click()
time.sleep(3)
# 断言：是否可以看到支付信息
try:
    firefox.find_element_by_xpath("//div[contains(.,'支付信息')]")
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
firefox.quit()
